package cn.tedu.oop2;

public class HomeWork {
    public static void main(String[] args) {
       Pigeon p=new Pigeon();
    }
}
abstract class Bird{
    int legNumbers=2;
    int eggNumbers;
    public abstract void fly();
    public abstract void layEggs();

}
class Pigeon extends Bird{
    @Override
    public void fly() {
        System.out.println("飞行");
    }

    @Override
    public void layEggs() {
        System.out.println("下蛋");
    }
}
class Swallow extends Bird{
    @Override
    public void fly() {
        System.out.println("飞行");

    }

    @Override
    public void layEggs() {
        System.out.println("下蛋");

    }
    public void makeNest(){
        System.out.println("筑巢");
    }
}
class Insect{
    int t=6;
    int s;
    public void fly(){
        System.out.println("飞行");
    }
    public void spawn(){
        System.out.println("产卵");
    }
}
class Ant extends Insect{

}
class Bee extends Insect{
    public void makeHoney(){
        System.out.println("蜂蜜");
    }

}